package org.example.mone.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;

/**
 * 
 * @TableName task
 */
@TableName(value ="task")
public class Task implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 
     */
    private String taskName;

    /**
     * 
     */
    private Long deployId;

    /**
     * 
     */
    private Integer taskType;

    /**
     * 
     */
    private Integer state;

    /**
     * 
     */
    private String taskVersion;

    /**
     * 
     */
    private Long startTime;

    /**
     * 
     */
    private Long endTime;

    /**
     * 
     */
    private Integer taskProgress;

    /**
     * 
     */
    private String params;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * 
     */
    public Long getId() {
        return id;
    }

    /**
     * 
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 
     */
    public String getTaskName() {
        return taskName;
    }

    /**
     * 
     */
    public void setTaskName(String taskName) {
        this.taskName = taskName;
    }

    /**
     * 
     */
    public Long getDeployId() {
        return deployId;
    }

    /**
     * 
     */
    public void setDeployId(Long deployId) {
        this.deployId = deployId;
    }

    /**
     * 
     */
    public Integer getTaskType() {
        return taskType;
    }

    /**
     * 
     */
    public void setTaskType(Integer taskType) {
        this.taskType = taskType;
    }

    /**
     * 
     */
    public Integer getState() {
        return state;
    }

    /**
     * 
     */
    public void setState(Integer state) {
        this.state = state;
    }

    /**
     * 
     */
    public String getTaskVersion() {
        return taskVersion;
    }

    /**
     * 
     */
    public void setTaskVersion(String taskVersion) {
        this.taskVersion = taskVersion;
    }

    /**
     * 
     */
    public Long getStartTime() {
        return startTime;
    }

    /**
     * 
     */
    public void setStartTime(Long startTime) {
        this.startTime = startTime;
    }

    /**
     * 
     */
    public Long getEndTime() {
        return endTime;
    }

    /**
     * 
     */
    public void setEndTime(Long endTime) {
        this.endTime = endTime;
    }

    /**
     * 
     */
    public Integer getTaskProgress() {
        return taskProgress;
    }

    /**
     * 
     */
    public void setTaskProgress(Integer taskProgress) {
        this.taskProgress = taskProgress;
    }

    /**
     * 
     */
    public String getParams() {
        return params;
    }

    /**
     * 
     */
    public void setParams(String params) {
        this.params = params;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Task other = (Task) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getTaskName() == null ? other.getTaskName() == null : this.getTaskName().equals(other.getTaskName()))
            && (this.getDeployId() == null ? other.getDeployId() == null : this.getDeployId().equals(other.getDeployId()))
            && (this.getTaskType() == null ? other.getTaskType() == null : this.getTaskType().equals(other.getTaskType()))
            && (this.getState() == null ? other.getState() == null : this.getState().equals(other.getState()))
            && (this.getTaskVersion() == null ? other.getTaskVersion() == null : this.getTaskVersion().equals(other.getTaskVersion()))
            && (this.getStartTime() == null ? other.getStartTime() == null : this.getStartTime().equals(other.getStartTime()))
            && (this.getEndTime() == null ? other.getEndTime() == null : this.getEndTime().equals(other.getEndTime()))
            && (this.getTaskProgress() == null ? other.getTaskProgress() == null : this.getTaskProgress().equals(other.getTaskProgress()))
            && (this.getParams() == null ? other.getParams() == null : this.getParams().equals(other.getParams()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getTaskName() == null) ? 0 : getTaskName().hashCode());
        result = prime * result + ((getDeployId() == null) ? 0 : getDeployId().hashCode());
        result = prime * result + ((getTaskType() == null) ? 0 : getTaskType().hashCode());
        result = prime * result + ((getState() == null) ? 0 : getState().hashCode());
        result = prime * result + ((getTaskVersion() == null) ? 0 : getTaskVersion().hashCode());
        result = prime * result + ((getStartTime() == null) ? 0 : getStartTime().hashCode());
        result = prime * result + ((getEndTime() == null) ? 0 : getEndTime().hashCode());
        result = prime * result + ((getTaskProgress() == null) ? 0 : getTaskProgress().hashCode());
        result = prime * result + ((getParams() == null) ? 0 : getParams().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", taskName=").append(taskName);
        sb.append(", deployId=").append(deployId);
        sb.append(", taskType=").append(taskType);
        sb.append(", state=").append(state);
        sb.append(", taskVersion=").append(taskVersion);
        sb.append(", startTime=").append(startTime);
        sb.append(", endTime=").append(endTime);
        sb.append(", taskProgress=").append(taskProgress);
        sb.append(", params=").append(params);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}